package com.ebt.censhi.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.ebt.m.cloud.bean.MyBusinessInfLocal;
import com.ebt.m.cloud.bean.MyDownloadInfLocal;
import com.ebt.m.cloud.bean.MyDownloadThreadInfoLocal;
import com.ebt.m.customer.db.CustomerInteraction;
import com.ebt.m.data.bean.BeanCustomerTape;

import com.ebt.censhi.greendao.gen.MyBusinessInfLocalDao;
import com.ebt.censhi.greendao.gen.MyDownloadInfLocalDao;
import com.ebt.censhi.greendao.gen.MyDownloadThreadInfoLocalDao;
import com.ebt.censhi.greendao.gen.CustomerInteractionDao;
import com.ebt.censhi.greendao.gen.BeanCustomerTapeDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig myBusinessInfLocalDaoConfig;
    private final DaoConfig myDownloadInfLocalDaoConfig;
    private final DaoConfig myDownloadThreadInfoLocalDaoConfig;
    private final DaoConfig customerInteractionDaoConfig;
    private final DaoConfig beanCustomerTapeDaoConfig;

    private final MyBusinessInfLocalDao myBusinessInfLocalDao;
    private final MyDownloadInfLocalDao myDownloadInfLocalDao;
    private final MyDownloadThreadInfoLocalDao myDownloadThreadInfoLocalDao;
    private final CustomerInteractionDao customerInteractionDao;
    private final BeanCustomerTapeDao beanCustomerTapeDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        myBusinessInfLocalDaoConfig = daoConfigMap.get(MyBusinessInfLocalDao.class).clone();
        myBusinessInfLocalDaoConfig.initIdentityScope(type);

        myDownloadInfLocalDaoConfig = daoConfigMap.get(MyDownloadInfLocalDao.class).clone();
        myDownloadInfLocalDaoConfig.initIdentityScope(type);

        myDownloadThreadInfoLocalDaoConfig = daoConfigMap.get(MyDownloadThreadInfoLocalDao.class).clone();
        myDownloadThreadInfoLocalDaoConfig.initIdentityScope(type);

        customerInteractionDaoConfig = daoConfigMap.get(CustomerInteractionDao.class).clone();
        customerInteractionDaoConfig.initIdentityScope(type);

        beanCustomerTapeDaoConfig = daoConfigMap.get(BeanCustomerTapeDao.class).clone();
        beanCustomerTapeDaoConfig.initIdentityScope(type);

        myBusinessInfLocalDao = new MyBusinessInfLocalDao(myBusinessInfLocalDaoConfig, this);
        myDownloadInfLocalDao = new MyDownloadInfLocalDao(myDownloadInfLocalDaoConfig, this);
        myDownloadThreadInfoLocalDao = new MyDownloadThreadInfoLocalDao(myDownloadThreadInfoLocalDaoConfig, this);
        customerInteractionDao = new CustomerInteractionDao(customerInteractionDaoConfig, this);
        beanCustomerTapeDao = new BeanCustomerTapeDao(beanCustomerTapeDaoConfig, this);

        registerDao(MyBusinessInfLocal.class, myBusinessInfLocalDao);
        registerDao(MyDownloadInfLocal.class, myDownloadInfLocalDao);
        registerDao(MyDownloadThreadInfoLocal.class, myDownloadThreadInfoLocalDao);
        registerDao(CustomerInteraction.class, customerInteractionDao);
        registerDao(BeanCustomerTape.class, beanCustomerTapeDao);
    }
    
    public void clear() {
        myBusinessInfLocalDaoConfig.clearIdentityScope();
        myDownloadInfLocalDaoConfig.clearIdentityScope();
        myDownloadThreadInfoLocalDaoConfig.clearIdentityScope();
        customerInteractionDaoConfig.clearIdentityScope();
        beanCustomerTapeDaoConfig.clearIdentityScope();
    }

    public MyBusinessInfLocalDao getMyBusinessInfLocalDao() {
        return myBusinessInfLocalDao;
    }

    public MyDownloadInfLocalDao getMyDownloadInfLocalDao() {
        return myDownloadInfLocalDao;
    }

    public MyDownloadThreadInfoLocalDao getMyDownloadThreadInfoLocalDao() {
        return myDownloadThreadInfoLocalDao;
    }

    public CustomerInteractionDao getCustomerInteractionDao() {
        return customerInteractionDao;
    }

    public BeanCustomerTapeDao getBeanCustomerTapeDao() {
        return beanCustomerTapeDao;
    }

}
